load("@py3_deps//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])

py_test(
    name = "config_test",
    srcs = ["config.py"],
    data = [
        ":configs",
    ],
    main = "config.py",
    python_version = "PY3",
    deps = [requirement("ruamel.yaml")],
)

filegroup(
    name = "configs",
    srcs = glob(["**/*.yaml"]) + [
        "//velodrome/fetcher:configs",
        "//velodrome/sql:configs",
        "//velodrome/token-counter:configs",
        "//velodrome/transform:configs",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//velodrome/fetcher:all-srcs",
        "//velodrome/sql:all-srcs",
        "//velodrome/token-counter:all-srcs",
        "//velodrome/transform:all-srcs",
    ],
)
